package com.linkhub.oms.data.sync.job.account;

import com.linkhub.oms.data.sync.service.ExchangeRateApiService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 汇率同步
 *
 * @author Frank
 */
@Slf4j
@Component
public class ExchangeRateSyncJob {
    @Resource
    private ExchangeRateApiService exchangeRateService;

    @Scheduled(cron = "0 0 10/1 * * ?")
    public void exchangeRateSyncJob() {
        log.info("ExchangeRateSyncJob start...");
        exchangeRateService.synExchangeRates();
        log.info("ExchangeRateSyncJob end...");
    }
}
